﻿<%@ Page Language="C#" AutoEventWireup="true" CodeFile="步步为营VS 2008 + .NET 3.5(13) - DLINQ(LINQ to SQL)之用户自定义函数、在不同的DataContext之间做更新、缓存、获取信息、数据加载选项和延迟加载.aspx.cs" Inherits="_35newpart_Linq_步步为营VS_2008___" %>

<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">

<html xmlns="http://www.w3.org/1999/xhtml">
<head runat="server">
    <title>Untitled Page</title>
</head>
<body>
    <form id="form1" runat="server">
    <div>
    
        <div class="postbody">
            <a href="http://www.cnblogs.com/webabcd/archive/2007/10/29/941007.html" 
                target="_blank">[索引页]</a><a 
                href="http://www.cnblogs.com/Files/webabcd/VS2008.rar"><br />
            [源码下载]<br />
            </a>
            <br />
            <br />
            <div align="center">
                <font face="Courier New">步步为营VS 2008 + .NET 3.5(13) - DLINQ(LINQ to 
                SQL)之用户自定义函数、在不同的DataContext之间做更新、缓存、获取信息、数据加载选项和延迟加载</font></div>
            <br />
            <br />
            作者：<a href="http://webabcd.cnblogs.com/" target="_blank">webabcd</a><br />
            <br />
            <br />
            介绍<br />
            以Northwind为<font face="Verdana">示例数据库</font>，DLINQ(LINQ to SQL)之<font 
                face="Courier New">调用标量值用户自定义函数；调用表值用户自定义函数；使用数据加载选项加载数据；相关信息的获取；字段的延迟加载；在不同的DataContext之间做更新；缓存</font><br />
            <br />
            <br />
            示例<br />
            <font face="Courier New">Others.aspx.cs</font><br />
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Data;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Configuration;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Collections;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Linq;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Web;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Web.Security;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Web.UI;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Web.UI.WebControls;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Web.UI.WebControls.WebParts;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Web.UI.HtmlControls;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;System.Xml.Linq;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;DAL;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">public</span><span style="COLOR: #000000">&nbsp;partial&nbsp;</span><span 
                    style="COLOR: #0000ff">class</span><span style="COLOR: #000000">&nbsp;LINQ_DLINQ_Others&nbsp;:&nbsp;System.Web.UI.Page<br />
                <img id="Codehighlighter1_377_936_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_377_936_Open_Text.style.display='none'; Codehighlighter1_377_936_Closed_Image.style.display='inline'; Codehighlighter1_377_936_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_377_936_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_377_936_Closed_Text.style.display='none'; Codehighlighter1_377_936_Open_Image.style.display='inline'; Codehighlighter1_377_936_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" /></span><span 
                    id="Codehighlighter1_377_936_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_377_936_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">protected</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">void</span><span style="COLOR: #000000">&nbsp;Page_Load(</span><span 
                    style="COLOR: #0000ff">object</span><span style="COLOR: #000000">&nbsp;sender,&nbsp;EventArgs&nbsp;e)<br />
                <img id="Codehighlighter1_440_934_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_440_934_Open_Text.style.display='none'; Codehighlighter1_440_934_Closed_Image.style.display='inline'; Codehighlighter1_440_934_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img 
                    id="Codehighlighter1_440_934_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_440_934_Closed_Text.style.display='none'; Codehighlighter1_440_934_Open_Image.style.display='inline'; Codehighlighter1_440_934_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_440_934_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_440_934_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;调用标量值用户自定义函数<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call_HelloFunctionScalar();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;调用表值用户自定义函数<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Call_HelloFunctionTable();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;不使用数据加载选项<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataLoadOptions_Original();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;使用数据加载选项加载数据<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataLoadOptions_LoadWith();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;使用数据加载选项加载数据，并且限制所要加载的数据<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DataLoadOptions_AssociateWith();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;相关信息的获取<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;GetInfo();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;字段的延迟加载<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;DelayLoaded();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;在不同的DataContext之间做更新<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;IsVersion();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;缓存<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ShowCache();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />}</span></span></div>
            <br />
            <font face="Courier New">调用标量值用户自定义函数</font><br />
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #0000ff">ALTER</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">FUNCTION</span><span style="COLOR: #000000">&nbsp;dbo.fnHelloFunctionScalar<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />(<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">@param</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="FONT-WEIGHT: bold; COLOR: #000000">nvarchar</span><span 
                    style="COLOR: #000000">(</span><span 
                    style="FONT-WEIGHT: bold; COLOR: #800000">100</span><span 
                    style="COLOR: #000000">)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">RETURNS</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="FONT-WEIGHT: bold; COLOR: #000000">nvarchar</span><span 
                    style="COLOR: #000000">(</span><span 
                    style="FONT-WEIGHT: bold; COLOR: #800000">200</span><span 
                    style="COLOR: #000000">)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">AS</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">BEGIN</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">RETURN</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">&#39;Hello:&#39;</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #808080">+</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #008000">@param</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">END</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span></div>
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img id="Codehighlighter1_4_57_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_57_Open_Text.style.display='none'; Codehighlighter1_4_57_Closed_Image.style.display='inline'; Codehighlighter1_4_57_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_4_57_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_57_Closed_Text.style.display='none'; Codehighlighter1_4_57_Open_Image.style.display='inline'; Codehighlighter1_4_57_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" /><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_4_57_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span 
                    id="Codehighlighter1_4_57_Open_Text"><span style="COLOR: #808080">///</span><span 
                    style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span 
                    style="COLOR: #008000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;调用标量值用户自定义函数<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span 
                    style="COLOR: #808080">&lt;/summary&gt;</span></span><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">void</span><span 
                    style="COLOR: #000000">&nbsp;Call_HelloFunctionScalar()<br />
                <img id="Codehighlighter1_98_308_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_98_308_Open_Text.style.display='none'; Codehighlighter1_98_308_Closed_Image.style.display='inline'; Codehighlighter1_98_308_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_98_308_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_98_308_Closed_Text.style.display='none'; Codehighlighter1_98_308_Open_Image.style.display='inline'; Codehighlighter1_98_308_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_98_308_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_98_308_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NorthwindDataContext&nbsp;ctx&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;NorthwindDataContext();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;ctx.HelloFunctionScalar(&quot;webabcd&quot;);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></div>
            运行结果<br />
            Hello:webabcd<br />
            <br />
            <font face="Courier New">调用表值用户自定义函数</font><br />
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #0000ff">ALTER</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">FUNCTION</span><span style="COLOR: #000000">&nbsp;dbo.fnHelloFunctionTable<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />(<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">@ID</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="FONT-WEIGHT: bold; COLOR: #000000">int</span><span 
                    style="COLOR: #000000">,<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">@name</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="FONT-WEIGHT: bold; COLOR: #000000">nvarchar</span><span 
                    style="COLOR: #000000">(</span><span 
                    style="FONT-WEIGHT: bold; COLOR: #800000">100</span><span 
                    style="COLOR: #000000">)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">RETURNS</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #008000">@tbl</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">TABLE</span><span style="COLOR: #000000">&nbsp;(</span><span 
                    style="COLOR: #ff0000">[ID]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="FONT-WEIGHT: bold; COLOR: #000000">int</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[Name]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span 
                    style="FONT-WEIGHT: bold; COLOR: #000000">nvarchar</span><span 
                    style="COLOR: #000000">(</span><span 
                    style="FONT-WEIGHT: bold; COLOR: #800000">100</span><span 
                    style="COLOR: #000000">))<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">AS</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">BEGIN</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">INSERT</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">INTO</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #008000">@tbl</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">VALUES</span><span style="COLOR: #000000">&nbsp;(</span><span 
                    style="COLOR: #008000">@ID</span><span style="COLOR: #000000">,&nbsp;</span><span 
                    style="COLOR: #008000">@name</span><span style="COLOR: #000000">)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">RETURN</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />&nbsp;&nbsp;&nbsp;&nbsp;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">END</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span></div>
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img id="Codehighlighter1_4_56_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_56_Open_Text.style.display='none'; Codehighlighter1_4_56_Closed_Image.style.display='inline'; Codehighlighter1_4_56_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_4_56_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_56_Closed_Text.style.display='none'; Codehighlighter1_4_56_Open_Image.style.display='inline'; Codehighlighter1_4_56_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" /><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_4_56_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span 
                    id="Codehighlighter1_4_56_Open_Text"><span style="COLOR: #808080">///</span><span 
                    style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span 
                    style="COLOR: #008000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;调用表值用户自定义函数<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span 
                    style="COLOR: #808080">&lt;/summary&gt;</span></span><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">void</span><span 
                    style="COLOR: #000000">&nbsp;Call_HelloFunctionTable()<br />
                <img id="Codehighlighter1_96_434_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_96_434_Open_Text.style.display='none'; Codehighlighter1_96_434_Closed_Image.style.display='inline'; Codehighlighter1_96_434_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_96_434_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_96_434_Closed_Text.style.display='none'; Codehighlighter1_96_434_Open_Image.style.display='inline'; Codehighlighter1_96_434_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_96_434_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_96_434_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NorthwindDataContext&nbsp;ctx&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;NorthwindDataContext();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;p&nbsp;=&nbsp;(ctx.HelloFunctionTable(1,&nbsp;&quot;webabcd&quot;)).Single();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;ID：&quot;&nbsp;+&nbsp;p.ID;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;Name：&quot;&nbsp;+&nbsp;p.Name;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></div>
            运行结果<br />
            <font face="Courier New">ID：1<br />
            Name：webabcd</font><br />
            <br />
            <font face="Courier New">不使用数据加载选项</font><br />
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img id="Codehighlighter1_4_54_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_54_Open_Text.style.display='none'; Codehighlighter1_4_54_Closed_Image.style.display='inline'; Codehighlighter1_4_54_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_4_54_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_54_Closed_Text.style.display='none'; Codehighlighter1_4_54_Open_Image.style.display='inline'; Codehighlighter1_4_54_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" /><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_4_54_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span 
                    id="Codehighlighter1_4_54_Open_Text"><span style="COLOR: #808080">///</span><span 
                    style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span 
                    style="COLOR: #008000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;不使用数据加载选项<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span 
                    style="COLOR: #808080">&lt;/summary&gt;</span></span><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">void</span><span 
                    style="COLOR: #000000">&nbsp;DataLoadOptions_Original()<br />
                <img id="Codehighlighter1_95_468_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_95_468_Open_Text.style.display='none'; Codehighlighter1_95_468_Closed_Image.style.display='inline'; Codehighlighter1_95_468_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_95_468_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_95_468_Closed_Text.style.display='none'; Codehighlighter1_95_468_Open_Image.style.display='inline'; Codehighlighter1_95_468_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_95_468_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_95_468_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NorthwindDataContext&nbsp;ctx&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;NorthwindDataContext();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;categories&nbsp;=&nbsp;from&nbsp;c&nbsp;</span><span 
                    style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;ctx.Categories&nbsp;select&nbsp;c;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">foreach</span><span style="COLOR: #000000">&nbsp;(var&nbsp;c&nbsp;</span><span 
                    style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;categories)<br />
                <img id="Codehighlighter1_268_462_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_268_462_Open_Text.style.display='none'; Codehighlighter1_268_462_Closed_Image.style.display='inline'; Codehighlighter1_268_462_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img 
                    id="Codehighlighter1_268_462_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_268_462_Closed_Text.style.display='none'; Codehighlighter1_268_462_Open_Image.style.display='inline'; Codehighlighter1_268_462_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_268_462_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_268_462_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;每一次迭代都会执行一条SQL语句来返回当前Category的Product<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">foreach</span><span 
                    style="COLOR: #000000">&nbsp;(var&nbsp;p&nbsp;</span><span style="COLOR: #0000ff">in</span><span 
                    style="COLOR: #000000">&nbsp;c.Products)<br />
                <img id="Codehighlighter1_377_452_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_377_452_Open_Text.style.display='none'; Codehighlighter1_377_452_Closed_Image.style.display='inline'; Codehighlighter1_377_452_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img 
                    id="Codehighlighter1_377_452_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_377_452_Closed_Text.style.display='none'; Codehighlighter1_377_452_Open_Image.style.display='inline'; Codehighlighter1_377_452_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_377_452_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_377_452_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;productName&nbsp;=&nbsp;p.ProductName&nbsp;+&nbsp;&quot;&lt;br&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></div>
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Description]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Picture]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Categories]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[SupplierID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[QuantityPerUnit]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsInStock]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsOnOrder]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ReorderLevel]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Discontinued]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Products]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[1]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[SupplierID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[QuantityPerUnit]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsInStock]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsOnOrder]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ReorderLevel]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Discontinued]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Products]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[2]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[SupplierID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[QuantityPerUnit]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsInStock]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsOnOrder]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ReorderLevel]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Discontinued]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Products]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[3]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[SupplierID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[QuantityPerUnit]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsInStock]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsOnOrder]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ReorderLevel]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Discontinued]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Products]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[4]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[SupplierID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[QuantityPerUnit]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsInStock]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsOnOrder]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ReorderLevel]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Discontinued]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Products]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[5]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[SupplierID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[QuantityPerUnit]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsInStock]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsOnOrder]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ReorderLevel]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Discontinued]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Products]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[6]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[SupplierID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[QuantityPerUnit]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsInStock]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsOnOrder]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ReorderLevel]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Discontinued]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Products]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[7]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[SupplierID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[QuantityPerUnit]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsInStock]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsOnOrder]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ReorderLevel]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Discontinued]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Products]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[8]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1</span></div>
            <br />
            <font face="Courier New">使用数据加载选项加载数据</font><br />
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img id="Codehighlighter1_4_57_Open_Image0" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_57_Open_Text.style.display='none'; Codehighlighter1_4_57_Closed_Image.style.display='inline'; Codehighlighter1_4_57_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_4_57_Closed_Image0" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_57_Closed_Text.style.display='none'; Codehighlighter1_4_57_Open_Image.style.display='inline'; Codehighlighter1_4_57_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" /><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_4_57_Closed_Text0" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span 
                    id="Codehighlighter1_4_57_Open_Text0"><span style="COLOR: #808080">///</span><span 
                    style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span 
                    style="COLOR: #008000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;使用数据加载选项加载数据<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span 
                    style="COLOR: #808080">&lt;/summary&gt;</span></span><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">void</span><span 
                    style="COLOR: #000000">&nbsp;DataLoadOptions_LoadWith()<br />
                <img id="Codehighlighter1_98_642_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_98_642_Open_Text.style.display='none'; Codehighlighter1_98_642_Closed_Image.style.display='inline'; Codehighlighter1_98_642_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_98_642_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_98_642_Closed_Text.style.display='none'; Codehighlighter1_98_642_Open_Image.style.display='inline'; Codehighlighter1_98_642_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_98_642_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_98_642_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NorthwindDataContext&nbsp;ctx&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;NorthwindDataContext();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Data.Linq.DataLoadOptions&nbsp;options&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;System.Data.Linq.DataLoadOptions();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;Category以LEFT&nbsp;JOIN的方式关联Product<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;options.LoadWith&lt;Categories&gt;(c&nbsp;=&gt;&nbsp;c.Products);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctx.LoadOptions&nbsp;=&nbsp;options;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;categories&nbsp;=&nbsp;from&nbsp;c&nbsp;</span><span 
                    style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;ctx.Categories&nbsp;select&nbsp;c;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">foreach</span><span style="COLOR: #000000">&nbsp;(var&nbsp;c&nbsp;</span><span 
                    style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;categories)<br />
                <img id="Codehighlighter1_495_636_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_495_636_Open_Text.style.display='none'; Codehighlighter1_495_636_Closed_Image.style.display='inline'; Codehighlighter1_495_636_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img 
                    id="Codehighlighter1_495_636_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_495_636_Closed_Text.style.display='none'; Codehighlighter1_495_636_Open_Image.style.display='inline'; Codehighlighter1_495_636_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_495_636_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_495_636_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">foreach</span><span style="COLOR: #000000">&nbsp;(var&nbsp;p&nbsp;</span><span 
                    style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;c.Products)<br />
                <img id="Codehighlighter1_551_626_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_551_626_Open_Text.style.display='none'; Codehighlighter1_551_626_Closed_Image.style.display='inline'; Codehighlighter1_551_626_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img 
                    id="Codehighlighter1_551_626_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_551_626_Closed_Text.style.display='none'; Codehighlighter1_551_626_Open_Image.style.display='inline'; Codehighlighter1_551_626_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_551_626_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_551_626_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;productName&nbsp;=&nbsp;p.ProductName&nbsp;+&nbsp;&quot;&lt;br&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span></div>
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Description]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Picture]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[SupplierID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[CategoryID2]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[QuantityPerUnit]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsInStock]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsOnOrder]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ReorderLevel]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Discontinued]</span><span 
                    style="COLOR: #000000">,&nbsp;(<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">SELECT</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff00ff">COUNT</span><span style="COLOR: #000000">(</span><span 
                    style="COLOR: #808080">*</span><span style="COLOR: #000000">)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">FROM</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[dbo]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[Products]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">AS</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t2]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">WHERE</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t2]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryID]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #808080">=</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryID]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;</span><span 
                    style="COLOR: #0000ff">AS</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[count]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Categories]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #ff00ff">LEFT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">OUTER</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">JOIN</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Products]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">ON</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">ORDER</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">BY</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1</span></div>
            <br />
            <font face="Courier New">使用数据加载选项加载数据，并且限制所要加载的数据</font><br />
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img id="Codehighlighter1_4_69_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_69_Open_Text.style.display='none'; Codehighlighter1_4_69_Closed_Image.style.display='inline'; Codehighlighter1_4_69_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_4_69_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_69_Closed_Text.style.display='none'; Codehighlighter1_4_69_Open_Image.style.display='inline'; Codehighlighter1_4_69_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" /><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_4_69_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span 
                    id="Codehighlighter1_4_69_Open_Text"><span style="COLOR: #808080">///</span><span 
                    style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span 
                    style="COLOR: #008000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;使用数据加载选项加载数据，并且限制所要加载的数据<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span 
                    style="COLOR: #808080">&lt;/summary&gt;</span></span><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">void</span><span 
                    style="COLOR: #000000">&nbsp;DataLoadOptions_AssociateWith()<br />
                <img id="Codehighlighter1_115_773_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_115_773_Open_Text.style.display='none'; Codehighlighter1_115_773_Closed_Image.style.display='inline'; Codehighlighter1_115_773_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_115_773_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_115_773_Closed_Text.style.display='none'; Codehighlighter1_115_773_Open_Image.style.display='inline'; Codehighlighter1_115_773_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_115_773_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_115_773_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NorthwindDataContext&nbsp;ctx&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;NorthwindDataContext();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Data.Linq.DataLoadOptions&nbsp;options&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;System.Data.Linq.DataLoadOptions();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;Category以LEFT&nbsp;JOIN的方式关联Product<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;options.LoadWith&lt;Categories&gt;(c&nbsp;=&gt;&nbsp;c.Products);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;限制所关联的Product<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;options.AssociateWith&lt;Categories&gt;(c&nbsp;=&gt;&nbsp;c.Products.Where(p&nbsp;=&gt;&nbsp;p.UnitPrice&nbsp;&gt;&nbsp;20));<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctx.LoadOptions&nbsp;=&nbsp;options;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;categories&nbsp;=&nbsp;from&nbsp;c&nbsp;</span><span 
                    style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;ctx.Categories&nbsp;select&nbsp;c;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">foreach</span><span style="COLOR: #000000">&nbsp;(var&nbsp;c&nbsp;</span><span 
                    style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;categories)<br />
                <img id="Codehighlighter1_626_767_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_626_767_Open_Text.style.display='none'; Codehighlighter1_626_767_Closed_Image.style.display='inline'; Codehighlighter1_626_767_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img 
                    id="Codehighlighter1_626_767_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_626_767_Closed_Text.style.display='none'; Codehighlighter1_626_767_Open_Image.style.display='inline'; Codehighlighter1_626_767_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_626_767_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_626_767_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">foreach</span><span style="COLOR: #000000">&nbsp;(var&nbsp;p&nbsp;</span><span 
                    style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;c.Products)<br />
                <img id="Codehighlighter1_682_757_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_682_757_Open_Text.style.display='none'; Codehighlighter1_682_757_Closed_Image.style.display='inline'; Codehighlighter1_682_757_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img 
                    id="Codehighlighter1_682_757_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_682_757_Closed_Text.style.display='none'; Codehighlighter1_682_757_Open_Image.style.display='inline'; Codehighlighter1_682_757_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_682_757_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_682_757_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">string</span><span style="COLOR: #000000">&nbsp;productName&nbsp;=&nbsp;p.ProductName&nbsp;+&nbsp;&quot;&lt;br&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></div>
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Description]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Picture]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[SupplierID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[CategoryID2]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[QuantityPerUnit]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsInStock]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitsOnOrder]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ReorderLevel]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Discontinued]</span><span 
                    style="COLOR: #000000">,&nbsp;(<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">SELECT</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff00ff">COUNT</span><span style="COLOR: #000000">(</span><span 
                    style="COLOR: #808080">*</span><span style="COLOR: #000000">)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">FROM</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[dbo]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[Products]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">AS</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t2]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">WHERE</span><span style="COLOR: #000000">&nbsp;(</span><span 
                    style="COLOR: #ff0000">[t2]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[UnitPrice]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #808080">&gt;</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #008000">@p0</span><span style="COLOR: #000000">)&nbsp;</span><span 
                    style="COLOR: #808080">AND</span><span style="COLOR: #000000">&nbsp;(</span><span 
                    style="COLOR: #ff0000">[t2]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryID]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #808080">=</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryID]</span><span style="COLOR: #000000">)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;)&nbsp;</span><span 
                    style="COLOR: #0000ff">AS</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[count]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Categories]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #ff00ff">LEFT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">OUTER</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">JOIN</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Products]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">ON</span><span 
                    style="COLOR: #000000">&nbsp;(</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[UnitPrice]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">&gt;</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000">)&nbsp;</span><span style="COLOR: #808080">AND</span><span 
                    style="COLOR: #000000">&nbsp;(</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">ORDER</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">BY</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t1]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[ProductID]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Currency&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;19;&nbsp;Scale&nbsp;=&nbsp;4)&nbsp;[20]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span></div>
            <br />
            <font face="Courier New">相关信息的获取</font><br />
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img id="Codehighlighter1_4_52_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_52_Open_Text.style.display='none'; Codehighlighter1_4_52_Closed_Image.style.display='inline'; Codehighlighter1_4_52_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_4_52_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_52_Closed_Text.style.display='none'; Codehighlighter1_4_52_Open_Image.style.display='inline'; Codehighlighter1_4_52_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" /><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_4_52_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span 
                    id="Codehighlighter1_4_52_Open_Text"><span style="COLOR: #808080">///</span><span 
                    style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span 
                    style="COLOR: #008000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;相关信息的获取<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span 
                    style="COLOR: #808080">&lt;/summary&gt;</span></span><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">void</span><span 
                    style="COLOR: #000000">&nbsp;GetInfo()<br />
                <img id="Codehighlighter1_76_758_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_76_758_Open_Text.style.display='none'; Codehighlighter1_76_758_Closed_Image.style.display='inline'; Codehighlighter1_76_758_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_76_758_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_76_758_Closed_Text.style.display='none'; Codehighlighter1_76_758_Open_Image.style.display='inline'; Codehighlighter1_76_758_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_76_758_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_76_758_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NorthwindDataContext&nbsp;ctx&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;NorthwindDataContext();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;categories&nbsp;=&nbsp;from&nbsp;c&nbsp;</span><span 
                    style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;ctx.Categories&nbsp;select&nbsp;c;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;ProviderType：&quot;&nbsp;+&nbsp;ctx.Mapping.ProviderType.ToString()&nbsp;+&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;DatabaseName：&quot;&nbsp;+&nbsp;ctx.Mapping.DatabaseName&nbsp;+&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;ContextType：&quot;&nbsp;+&nbsp;ctx.Mapping.ContextType.ToString()&nbsp;+&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;TableName：&quot;&nbsp;+&nbsp;ctx.Mapping.GetTable(</span><span 
                    style="COLOR: #0000ff">typeof</span><span style="COLOR: #000000">(Categories)).TableName&nbsp;+&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;Expression：&quot;&nbsp;+&nbsp;categories.Expression.ToString()&nbsp;+&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;result.InnerHtml&nbsp;+=&nbsp;&quot;T-SQL：&quot;&nbsp;+&nbsp;categories.Provider.ToString()&nbsp;+&nbsp;&quot;&lt;br&nbsp;/&gt;&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></div>
            运行结果<br />
            <font face="Courier New">ProviderType：System.Data.Linq.SqlClient.SqlProvider<br />
            DatabaseName：C:\DOCUMENTS AND 
            SETTINGS\WANGLEI\桌面\VS2008\WEB\APP_DATA\NORTHWIND.MDF<br />
            ContextType：DAL.NorthwindDataContext<br />
            TableName：dbo.Categories<br />
            Expression：Table(Categories).Select(c =&gt; c)<br />
            T-SQL：SELECT [t0].[CategoryID], [t0].[CategoryName], [t0].[Description] FROM 
            [dbo].[Categories] AS [t0]</font><br />
            <br />
            <font face="Courier New">字段的延迟加载</font><br />
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img id="Codehighlighter1_4_52_Open_Image0" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_52_Open_Text.style.display='none'; Codehighlighter1_4_52_Closed_Image.style.display='inline'; Codehighlighter1_4_52_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_4_52_Closed_Image0" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_52_Closed_Text.style.display='none'; Codehighlighter1_4_52_Open_Image.style.display='inline'; Codehighlighter1_4_52_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" /><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_4_52_Closed_Text0" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span 
                    id="Codehighlighter1_4_52_Open_Text0"><span style="COLOR: #808080">///</span><span 
                    style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span 
                    style="COLOR: #008000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;字段的延迟加载<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span 
                    style="COLOR: #808080">&lt;/summary&gt;</span></span><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">void</span><span 
                    style="COLOR: #000000">&nbsp;DelayLoaded()<br />
                <img id="Codehighlighter1_80_412_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_80_412_Open_Text.style.display='none'; Codehighlighter1_80_412_Closed_Image.style.display='inline'; Codehighlighter1_80_412_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_80_412_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_80_412_Closed_Text.style.display='none'; Codehighlighter1_80_412_Open_Image.style.display='inline'; Codehighlighter1_80_412_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_80_412_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_80_412_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;在对象关系设计器（Object&nbsp;Relational&nbsp;Designer）中设置Categories实体的Picture属性的Delay&nbsp;Loaded为True<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NorthwindDataContext&nbsp;ctx&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;NorthwindDataContext();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;var&nbsp;category&nbsp;=&nbsp;(from&nbsp;c&nbsp;</span><span 
                    style="COLOR: #0000ff">in</span><span style="COLOR: #000000">&nbsp;ctx.Categories<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;select&nbsp;c).Single(c&nbsp;=&gt;&nbsp;c.CategoryID&nbsp;==&nbsp;1);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;System.Data.Linq.Binary&nbsp;b&nbsp;=&nbsp;category.Picture;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></div>
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryName]</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Description]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Categories]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[1]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SELECT</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Picture]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">FROM</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Categories]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #0000ff">AS</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[t0]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[1]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1</span></div>
            <br />
            <font face="Courier New">在不同的DataContext之间做更新</font><br />
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img id="Codehighlighter1_4_65_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_65_Open_Text.style.display='none'; Codehighlighter1_4_65_Closed_Image.style.display='inline'; Codehighlighter1_4_65_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_4_65_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_65_Closed_Text.style.display='none'; Codehighlighter1_4_65_Open_Image.style.display='inline'; Codehighlighter1_4_65_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" /><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_4_65_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span 
                    id="Codehighlighter1_4_65_Open_Text"><span style="COLOR: #808080">///</span><span 
                    style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span 
                    style="COLOR: #008000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;在不同的DataContext之间做更新<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span 
                    style="COLOR: #808080">&lt;/summary&gt;</span></span><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">void</span><span 
                    style="COLOR: #000000">&nbsp;IsVersion()<br />
                <img id="Codehighlighter1_91_577_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_91_577_Open_Text.style.display='none'; Codehighlighter1_91_577_Closed_Image.style.display='inline'; Codehighlighter1_91_577_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_91_577_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_91_577_Closed_Text.style.display='none'; Codehighlighter1_91_577_Open_Image.style.display='inline'; Codehighlighter1_91_577_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_91_577_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_91_577_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;在Categories实体的主键上添加属性IsVersion=true，即Time&nbsp;Stamp为True<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Categories&nbsp;c&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">null</span><span style="COLOR: #000000">;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;(NorthwindDataContext&nbsp;ctx&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;NorthwindDataContext())<br />
                <img id="Codehighlighter1_266_403_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_266_403_Open_Text.style.display='none'; Codehighlighter1_266_403_Closed_Image.style.display='inline'; Codehighlighter1_266_403_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img 
                    id="Codehighlighter1_266_403_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_266_403_Closed_Text.style.display='none'; Codehighlighter1_266_403_Open_Image.style.display='inline'; Codehighlighter1_266_403_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_266_403_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_266_403_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctx.DeferredLoadingEnabled&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">false</span><span style="COLOR: #000000">;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c&nbsp;=&nbsp;ctx.Categories.First();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;c.Description&nbsp;=&nbsp;&quot;webabcd&quot;;<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #0000ff">using</span><span style="COLOR: #000000">&nbsp;(NorthwindDataContext&nbsp;ctx&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;NorthwindDataContext())<br />
                <img id="Codehighlighter1_484_571_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_484_571_Open_Text.style.display='none'; Codehighlighter1_484_571_Closed_Image.style.display='inline'; Codehighlighter1_484_571_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockStart.gif" /><img 
                    id="Codehighlighter1_484_571_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_484_571_Closed_Text.style.display='none'; Codehighlighter1_484_571_Open_Image.style.display='inline'; Codehighlighter1_484_571_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedSubBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_484_571_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_484_571_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctx.Categories.Attach(c,&nbsp;</span><span 
                    style="COLOR: #0000ff">true</span><span style="COLOR: #000000">);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;ctx.SubmitChanges();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedSubBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;}</span></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></div>
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">UPDATE</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[dbo]</span><span 
                    style="COLOR: #000000">.</span><span style="COLOR: #ff0000">[Categories]</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">SET</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #ff0000">[CategoryName]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p2</span><span 
                    style="COLOR: #000000">,&nbsp;</span><span style="COLOR: #ff0000">[Description]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p3</span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #0000ff">WHERE</span><span 
                    style="COLOR: #000000">&nbsp;(</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p0</span><span 
                    style="COLOR: #000000">)&nbsp;</span><span style="COLOR: #808080">AND</span><span 
                    style="COLOR: #000000">&nbsp;(</span><span style="COLOR: #ff0000">[CategoryID]</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #808080">=</span><span 
                    style="COLOR: #000000">&nbsp;</span><span style="COLOR: #008000">@p1</span><span 
                    style="COLOR: #000000">)<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[1]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p1:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[1]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p2:&nbsp;Input&nbsp;String&nbsp;(Size&nbsp;=&nbsp;9;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[Beverages]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;@p3:&nbsp;Input&nbsp;String&nbsp;(Size&nbsp;=&nbsp;7;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[webabcd]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #808080">//</span><span style="COLOR: #008080">--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1</span></div>
            <br />
            <font face="Courier New">缓存</font><br />
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img id="Codehighlighter1_4_47_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_47_Open_Text.style.display='none'; Codehighlighter1_4_47_Closed_Image.style.display='inline'; Codehighlighter1_4_47_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_4_47_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_4_47_Closed_Text.style.display='none'; Codehighlighter1_4_47_Open_Image.style.display='inline'; Codehighlighter1_4_47_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" /><span style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_4_47_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff">/**/</span><span 
                    id="Codehighlighter1_4_47_Open_Text"><span style="COLOR: #808080">///</span><span 
                    style="COLOR: #008000">&nbsp;</span><span style="COLOR: #808080">&lt;summary&gt;</span><span 
                    style="COLOR: #008000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;缓存<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #808080">///</span><span style="COLOR: #008000">&nbsp;</span><span 
                    style="COLOR: #808080">&lt;/summary&gt;</span></span><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #000000">&nbsp;&nbsp;&nbsp;&nbsp;</span><span style="COLOR: #0000ff">void</span><span 
                    style="COLOR: #000000">&nbsp;ShowCache()<br />
                <img id="Codehighlighter1_73_679_Open_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_73_679_Open_Text.style.display='none'; Codehighlighter1_73_679_Closed_Image.style.display='inline'; Codehighlighter1_73_679_Closed_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockStart.gif" /><img 
                    id="Codehighlighter1_73_679_Closed_Image" align="top" alt="" 
                    onclick="this.style.display='none'; Codehighlighter1_73_679_Closed_Text.style.display='none'; Codehighlighter1_73_679_Open_Image.style.display='inline'; Codehighlighter1_73_679_Open_Text.style.display='inline';" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ContractedBlock.gif" 
                    style="DISPLAY: none" />&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    id="Codehighlighter1_73_679_Closed_Text" 
                    style="BORDER-RIGHT: #808080 1px solid; BORDER-TOP: #808080 1px solid; DISPLAY: none; BORDER-LEFT: #808080 1px solid; BORDER-BOTTOM: #808080 1px solid; BACKGROUND-COLOR: #ffffff"><img 
                    alt="" src="http://www.cnblogs.com/Images/dot.gif" /></span><span 
                    id="Codehighlighter1_73_679_Open_Text"><span style="COLOR: #000000">{<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;</span><span 
                    style="COLOR: #008000">//&nbsp;查询后数据会被缓存，如果之后以主键查询的话，会先在缓存里查找<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;NorthwindDataContext&nbsp;ctx&nbsp;=&nbsp;</span><span 
                    style="COLOR: #0000ff">new</span><span style="COLOR: #000000">&nbsp;NorthwindDataContext();<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Categories&nbsp;category&nbsp;=&nbsp;ctx.Categories.Single(c&nbsp;=&gt;&nbsp;c.CategoryName&nbsp;==&nbsp;&quot;Beverages&quot;);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Categories&nbsp;category2&nbsp;=&nbsp;ctx.Categories.Single(c&nbsp;=&gt;&nbsp;c.CategoryName&nbsp;==&nbsp;&quot;Beverages&quot;);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Categories&nbsp;category3&nbsp;=&nbsp;ctx.Categories.Single(c&nbsp;=&gt;&nbsp;c.CategoryID&nbsp;==&nbsp;1);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Categories&nbsp;category4&nbsp;=&nbsp;ctx.Categories.Single(c&nbsp;=&gt;&nbsp;c.CategoryID&nbsp;==&nbsp;1);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" /><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Categories&nbsp;category5&nbsp;=&nbsp;ctx.Categories.Single(c&nbsp;=&gt;&nbsp;c.CategoryID&nbsp;==&nbsp;2);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/InBlock.gif" />&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;Categories&nbsp;category6&nbsp;=&nbsp;ctx.Categories.Single(c&nbsp;=&gt;&nbsp;c.CategoryID&nbsp;==&nbsp;2);<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/ExpandedBlockEnd.gif" />&nbsp;&nbsp;&nbsp;&nbsp;}</span></span></div>
            <div style="BORDER-RIGHT: #cccccc 1px solid; PADDING-RIGHT: 5px; BORDER-TOP: #cccccc 1px solid; PADDING-LEFT: 4px; FONT-SIZE: 13px; PADDING-BOTTOM: 4px; BORDER-LEFT: #cccccc 1px solid; WIDTH: 98%; WORD-BREAK: break-all; PADDING-TOP: 4px; BORDER-BOTTOM: #cccccc 1px solid; BACKGROUND-COLOR: #eeeeee">
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /><span 
                    style="COLOR: #0000ff">SELECT</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryID]</span><span style="COLOR: #000000">,&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryName]</span><span style="COLOR: #000000">,&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[Description]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">FROM</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[dbo]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[Categories]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">AS</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">WHERE</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryName]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #808080">=</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #008000">@p0</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;String&nbsp;(Size&nbsp;=&nbsp;9;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[Beverages]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">SELECT</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryID]</span><span style="COLOR: #000000">,&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryName]</span><span style="COLOR: #000000">,&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[Description]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">FROM</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[dbo]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[Categories]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">AS</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">WHERE</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryName]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #808080">=</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #008000">@p0</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;String&nbsp;(Size&nbsp;=&nbsp;9;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[Beverages]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">SELECT</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryID]</span><span style="COLOR: #000000">,&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryName]</span><span style="COLOR: #000000">,&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[Description]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">FROM</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[dbo]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[Categories]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #0000ff">AS</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #0000ff">WHERE</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #ff0000">[t0]</span><span style="COLOR: #000000">.</span><span 
                    style="COLOR: #ff0000">[CategoryID]</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #808080">=</span><span style="COLOR: #000000">&nbsp;</span><span 
                    style="COLOR: #008000">@p0</span><span style="COLOR: #000000"><br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" /></span><span 
                    style="COLOR: #008080">--&nbsp;@p0:&nbsp;Input&nbsp;Int32&nbsp;(Size&nbsp;=&nbsp;0;&nbsp;Prec&nbsp;=&nbsp;0;&nbsp;Scale&nbsp;=&nbsp;0)&nbsp;[2]<br />
                <img align="top" alt="" 
                    src="http://www.cnblogs.com/Images/OutliningIndicators/None.gif" />--&nbsp;Context:&nbsp;SqlProvider(Sql2005)&nbsp;Model:&nbsp;AttributedMetaModel&nbsp;Build:&nbsp;3.5.20706.1</span></div>
            <br />
            <br />
            OK<br />
            <a href="http://www.cnblogs.com/Files/webabcd/VS2008.rar">[源码下载]</a>
        </div>
    
    </div>
    </form></body>
</html>
